#pragma once

#include <entt/entt.hpp>
#include "qlib/all.h"

namespace qbe::draw::ruler {

enum struct State { None = 0, Create, Update, Complete, Cancel };
struct Param {
  State state = State::None;

  qlib::Ruler::s_ptr cache_ruler;

  entt::entity entity = entt::null;
  entt::entity complete_entity = entt::null;

  bool clear_tag = false;
  bool is_moveing = false;

  bool first = true;
  bool need_exit_abs = false;

  void reset() {
    state = State::None;
    entity = entt::null;
    is_moveing = false;
    clear_tag = false;
    first = true;
  }
};
}  // namespace qbe::draw::ruler